//
//  CKBPresenter.h
//  JJICar
//
//  Created by 朱维坚 on 16/3/17.
//  Copyright © 2016年 mac. All rights reserved.
//
#import "CKBApi.h"
#ifndef CKBURL
//
//#ifdef DEBUG
//#define CKBURL(command) [NSString stringWithFormat:@"http://test.ungps.com/%@",command]
//#else
#define CKBURL(command) [NSString stringWithFormat:@"http://weixin.ungps.com/%@",command]
#endif

#define CKBAreaCmdURL(command) [NSString stringWithFormat:@"http://121.40.34.252:7156/%@",command]
//#endif


@interface CKBPresenter : Presenter

AS_SINGLETON(CKBPresenter)


/**
 *  获取设备列表
 */
#pragma mark GetTermianlInfo
AS_STRING(GetTermianlInfo)
AS_STRING(GetTermianlInfoIO_loginName)
AS_STRING(GetTermianlInfoIO_code)
@property (nonatomic,strong) NSArray *terminals;


/**
 *  获取车辆最后位置
 */
#pragma mark - GetLastGpsItem
AS_STRING(GetLastGpsItem)
AS_STRING(GetLastGpsItemIO_terminalToken)
@property(nonatomic,strong) LastGpsItem *adress;

/**
 * 获取车辆某段时间轨迹
 */
#pragma mark - GetGpsItemList
AS_STRING(GetGpsItemList)
AS_STRING(GetGpsItemListIO_terminalToken)
AS_STRING(GetGpsItemListIO_StartTime)
AS_STRING(GetGpsItemListIO_EndTime)
AS_STRING(GetGpsItemListIO_Speed)
@property(nonatomic,strong) GpsItemList *track;

/**
 *  查询终端所有相关的区域报警设置
 */
#pragma mark - QueryAreaSetting
AS_STRING(QueryAreaSetting)
AS_STRING(QueryAreaSettingIO_terminalKey)
@property(nonatomic,strong) QueryAreaSetting *setting;

/**
 *  删除终端所有相关的区域报警设置
 */
#pragma mark DelAreaSetting
AS_STRING(DelAreaSetting)
AS_STRING(DelAreaSettingIO_terminalKey)
@property(nonatomic,strong) DelAreaSetting *delSetting;

/**
 *  区域报警设置
 */
#pragma mark AreaSetting
AS_STRING(AreaSetting)
AS_STRING(AreaSettingIO_radius)
AS_STRING(AreaSettingIO_offsetLon)
AS_STRING(AreaSettingIO_offsetLat)
AS_STRING(AreaSettingIO_timeType)
AS_STRING(AreaSettingIO_lonlatJsonArray)
AS_STRING(AreaSettingIO_areaType)
AS_STRING(AreaSettingIO_terminalKey)
AS_STRING(AreaSettingIO_areaName)
AS_STRING(AreaSettingIO_alarmType)
@property(nonatomic,strong) AreaSetting *AreaResult;
/**
 *  设备绑定
 */
#pragma mark DeviceBinding
AS_STRING(DeviceBinding)
AS_STRING(DeviceBindingIO_termianlNumber)
AS_STRING(DeviceBindingIO_code)
AS_STRING(DeviceBindingIO_simCard)
AS_STRING(DeviceBindingIO_loginName)
AS_STRING(DeviceBindingIO_termianlType)
@property(nonatomic,strong)DeviceBinding *TerminalInfo;
/**
 *  设备解绑
 */
#pragma mark DeviceUnBinding
AS_STRING(DeviceUnBinding)
AS_STRING(DeviceUnBindingIO_token)
AS_STRING(DeviceUnBindingIO_loginName)
AS_STRING(DeviceUnBindingIO_code)

/**
 *  终端备注
 */
#pragma mark UpdateTermianlRemark
AS_STRING(UpdateTermianlRemark)
AS_STRING(UpdateTermianlRemarkIO_token)
AS_STRING(UpdateTermianlRemarkIO_remark)

/**
 *  查询设备配置
 */
#pragma mark GetPublicParam
AS_STRING(GetPublicParam)
AS_STRING(GetPublicParamIO_TypeName)
AS_STRING(GetPublicParamIO_SIM)
AS_STRING(GetPublicParamIO_PublicNo)
@property(nonatomic,strong) GetPublicParam *paramSetting;
/**
 *  发送命令
 */
#pragma mark SendCommand
AS_STRING(SendCommand)
AS_STRING(SendCommandIO_terminalToken)
AS_STRING(SendCommandIO_commandType)
AS_STRING(SendCommandIO_json)
@property(nonatomic,strong) SendCommand *SendCommandReply;
/**
 *  查询设备最新多媒体数据信息
 */
#pragma mark SearchMediaFileLastTimeItem
AS_STRING(SearchMediaFileLastTimeItem)
AS_STRING(SearchMediaFileLastTimeItemIO_terminalToken)
AS_STRING(SearchMediaFileLastTimeItemIO_mediaType)
@property(nonatomic,strong) SearchMediaFileLastTimeItem *lastTimeItem;
/**
 *  查询时间点的多媒体数据
 */
#pragma mark SearchMediaFilesByTimes
AS_STRING(SearchMediaFilesByTimes)
AS_STRING(SearchMediaFilesByTimesIO_mediaType)
AS_STRING(SearchMediaFilesByTimesIO_times)
AS_STRING(SearchMediaFilesByTimesIO_ascOrDes)
AS_STRING(SearchMediaFilesByTimesIO_terminalToken)
@property(nonatomic,strong) SearchMediaFilesByTimes *MediaItem;
/**
 *  查询时间段内的多媒体数据
 */
#pragma mark SearchMediaFiles
AS_STRING(SearchMediaFiles)
AS_STRING(SearchMediaFilesIO_startTime )
AS_STRING(SearchMediaFilesIO_mediaType)
AS_STRING(SearchMediaFilesIO_ascOrDes)
AS_STRING(SearchMediaFilesIO_terminalToken)
AS_STRING(SearchMediaFilesIO_endTime )
@property(nonatomic,strong) NSArray *MeidaItemArry;


/**
 *  查询指令执行状态
 */
#pragma mark GetCommandExecuteResult
AS_STRING(GetCommandExecuteResult)
AS_STRING(GetCommandExecuteResultIO_terminalToken)
AS_STRING(GetCommandExecuteResultIO_commandType)

/**
 *  查询卡号
 */
#pragma mark GetCardInfo
AS_STRING(GetCardInfo)
AS_STRING(GetCardInfoIO_sim)
AS_STRING(GetCardInfoIO_searchKey)
@property (nonatomic ,strong) GetCardInfo *carInfo;
@end
